#include <stdio.h>
#include<math.h>
int main()
{
    int n, m;
    int a, b, c;
    while (scanf_s("%d %d", &n, &m) != -1)
    {
        int flag = 0;
        for (int i = n; i <= m; i++)
        {
            a = i / 100;
            b = (i % 100) / 10;
            c = i % 10;
            if (a * a * a + b * b * b + c * c * c == i)
            {
                flag++;
                printf("%d ", i);
            }
        }
        if (flag == 0)
        {
            printf("no\n");
        }
        else
        {
            printf("\n");
        }
    }
    return 0;
}